Autogenerated HTML docs for v1.5.6.2-291-g7eef3 
diff --git a/git-apply.html b/git-apply.html index 13ba322..12bdbc4 100644 --- a/git-apply.html +++ b/git-apply.html 
@@ -326,7 +326,7 @@  [--allow-binary-replacement | --binary] [--reject] [-z]   [-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]   [--whitespace=&lt;nowarn|warn|fix|error|error-all&gt;]  - [--exclude=PATH] [--verbose] [&lt;patch&gt;&#8230;]</div></div>  + [--exclude=PATH] [--directory=&lt;root&gt;] [--verbose] [&lt;patch&gt;&#8230;]</div></div>   </div>   <h2 id="_description">DESCRIPTION</h2>   <div class="sectionbody">  @@ -628,6 +628,18 @@  adjusting the hunk headers appropriately).   </p>   </dd>  +<dt>  +--directory=&lt;root&gt;  +</dt>  +<dd>  +<p>  + Prepend &lt;root&gt; to all filenames. If a "-p" argument was passed, too,  + it is applied before prepending the new root.  +</p>  +<div class="para"><p>For example, a patch that talks about updating <tt>a/git-gui.sh</tt> to <tt>b/git-gui.sh</tt>  +can be applied to the file in the working tree <tt>modules/git-gui/git-gui.sh</tt> by  +running <tt>git apply --directory=modules/git-gui</tt>.</p></div>  +</dd>   </dl></div>   </div>   <h2 id="_configuration">Configuration</h2>  @@ -671,7 +683,7 @@  </div>   <div id="footer">   <div id="footer-text">  -Last updated 2008-07-06 05:16:34 UTC  +Last updated 2008-07-10 02:30:35 UTC   </div>   </div>   </body>  
diff --git a/git-apply.txt b/git-apply.txt index e9f724b..feb51f1 100644 --- a/git-apply.txt +++ b/git-apply.txt 
@@ -14,7 +14,7 @@  [--allow-binary-replacement | --binary] [--reject] [-z]  [-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]  [--whitespace=<nowarn|warn|fix|error|error-all>] - [--exclude=PATH] [--verbose] [<patch>...] + [--exclude=PATH] [--directory=<root>] [--verbose] [<patch>...]    DESCRIPTION  ----------- @@ -182,6 +182,14 @@ 	by inspecting the patch (e.g. after editing the patch without 	adjusting the hunk headers appropriately).   +--directory=<root>:: +	Prepend <root> to all filenames. If a "-p" argument was passed, too, +	it is applied before prepending the new root. ++ +For example, a patch that talks about updating `a/git-gui.sh` to `b/git-gui.sh` +can be applied to the file in the working tree `modules/git-gui/git-gui.sh` by +running `git apply --directory=modules/git-gui`. +  Configuration  -------------